home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
351-375
/
disk_361
/
xcolor-lib
/
demo_sources
/
demo_i.s
< prev
next >
Wrap
Text File
|
1992-05-06
|
3KB
|
90 lines
;
;
; DEMO I - XColor library
;
;
; by Roger Fischlin
; Steigerwaldweg 6
; 6450 Hanau 7
; West Germany
;
;
; To run this demo the xcolor library must be available !
;
incdir "fh1:include/" ; path may be different
include "exec/exec_lib.i"
include "intuition/intuitionbase.i"
include "intuition/intuition.i"
include "intuition/intuition_lib.i"
include "fh1:Color/XColor.i"
include "misc/easystart.i" ; I love the Workbench !
move.l #XC_VERSION,d0 ; open library
lea.l XColorName(pc),a1
CALLEXEC OpenLibrary
tst.l d0
beq NoLibrary
move.l d0,_XColorBase
move.l d0,a0 ; XColor has already opened
move.l XCb_IntuitionBase(a0),a0 ; the Intuition-Library - so why should I
move.l ib_ActiveScreen(a0),d0 ; it a second time ????
lea.l Palette(pc),a0 ; put up ColorRequester structure
move.l d0,CR_Screen(a0) ; ^screen
move.b #0,CR_TextColour(a0) ; pens
move.b #1,CR_BackColour(a0)
move.b #2,CR_GBorderColour(a0)
move.b #0,CR_GTextColour(a0)
move.w #10,CR_LeftEdge(a0) ; X,Y
move.w #10,CR_TopEdge(a0)
move.l #4,CR_DefaultEntries(a0) ; default workbench palette
move.l #DefaultPalette,CR_DefaultColourMap(a0)
move.l #ScreenTitle,CR_ScreenTitle(a0) ; screen title
move.l #WindowTitle,CR_DefaultWTitle(a0) ; defalut window title
clr.l CR_JMPWindow(a0) ; no user interface
clr.l CR_JMPDraw(a0)
clr.l CR_JMPMode(a0)
clr.l CR_JMPMessage(a0)
clr.l CR_Font(a0) ; use default font (should be 8x8)
move.l #FLAG_NORMAL!FLAG_RGB,CR_Flags(a0) ; don't use hex, but use HSV instead of RGB
CALLXCOLOR ColourRequester
move.l _XColorBase,a1 ; close library
CALLEXEC CloseLibrary
NoLibrary moveq.l #0,d0
rts
XColorName XCOLORNAME
_XColorBase dc.l 0
Palette ds.b CR_SIZEOF
even
DefaultPalette dc.w $05a,$fff,$000,$f80
even
ScreenTitle dc.b "DEMO - XCOLOR LIBRARY BY ROGER FISCHLIN",0
even
WindowTitle dc.b "Palette ",0
even